import com.sun.source.tree.YieldTree;

import java.lang.Throwable;
import java.lang.Math;

public class Test19 {
    public static void main(String[] args) {
        try {
            showArea(1,1,1);
        } catch (Exception e) {

        }

    }

    public static void showArea(int a, int b, int c) throws TriangleException {
        double p = (a + b + c) / 2.0;

        double ret = p * (p - a) * (p - b) * (p - c);

        if (ret <= 0) {
            throw new TriangleException();
        }

        double area = Math.sqrt(ret);

        System.out.println("面积为" + area);
    }
}

class TriangleException extends Exception {
    public TriangleException() {
        System.out.println("无法构成三角形!");
    }
}